<!--
 * @FilePath     : /study_code/layui/15-61.html
 * @Description  : layui 风格 标签布局实现
 * @Date         : 2025-02-24 14:32
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-09 17:06:29
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="/layui/dist/layui.js" />
    <style>
      .layui-form-pane .layui-form-label {
        display: flex;
        align-items: center;
        justify-content: center;
      }
    </style>
  </head>
  <body>
    <form class="layui-form layui-form-pane xm-select-demo lay-label-center" action="">
      <div class="layui-form-item" pane>
        <label class="layui-form-label">居中风格</label>
        <div class="layui-input-block">
          <div id="demo2"></div>
        </div>
      </div>
    </form>

    <form class="layui-form layui-form-pane xm-select-demo" action="">
      <div class="layui-form-item" pane>
        <label class="layui-form-label">默认风格</label>
        <div class="layui-input-block">
          <div id="demo3"></div>
        </div>
      </div>
    </form>

    <script src="/xm-select/dist/xm-select.js"></script>
    <script>
      var demo2 = xmSelect.render({
        el: '#demo2',
        toolbar: {
          show: true,
        },
        filterable: true,
        height: '500px',
        autoRow: true,
        data: [
          { name: '张三1', value: 1, selected: true },
          { name: '李四1', value: 2, selected: true },
          { name: '王五1', value: 3, disabled: true },
          { name: '苹果2', value: 4, selected: true, disabled: true },
          { name: '香蕉2', value: 5, selected: true },
          { name: '葡萄2', value: 6 },
        ],
      })

      var demo3 = xmSelect.render({
        el: '#demo3',
        toolbar: {
          show: true,
        },
        filterable: true,
        height: '500px',
        autoRow: true,
        data: [
          { name: '张三1', value: 1, selected: true },
          { name: '李四1', value: 2, selected: true },
          { name: '王五1', value: 3, disabled: true },
          { name: '苹果2', value: 4, selected: true, disabled: true },
          { name: '香蕉2', value: 5, selected: true },
          { name: '葡萄2', value: 6 },
        ],
      })
    </script>
  </body>
</html>
